#ifndef IMAGEPROCESSER_H
#define IMAGEPROCESSER_H

#include <QtGui>

class ImageProcesser
{
    unsigned char **data;
    int width;
    int height;
public:
    ImageProcesser(QImage *img);
    ~ImageProcesser();
    QImage* GetImage();

    void Ecualize();
    void Threshold(int thres);
    void Dilate(int num);
    void Erode(int num) ;
    unsigned char GetAutomaticThreshold();
    unsigned char GetOtsuThreshold();
    int TagObjects(unsigned char **output);

private:
    void ToGray(QImage *img);

};

#endif // IMAGEPROCESSER_H
